import {
  init as AmapGeolocationInit,
  Geolocation
} from 'react-native-amap-geolocation'
export const getLocation = () => {
  return new Promise((resolve, reject) => {
    Geolocation.getCurrentPosition(
      ({ coords: { latitude, longitude } }) =>
        resolve({ latitude, longitude }),
      error => reject(error)
    )
  })
}
